PowerKernel SERVER:
The
PowerKernel server resides in the PowerKernel.jar
file. Applications using the PowerKernel server must include this file on the
CLASSPATH. For clients, the
PowerKernelClient.jar file will suffice.
Running
in the Servlet Engine, the PowerKernel will activate
upon client access to the Servlet handler.
For example, when the client opens a PowerSpace connection to: http://your.server.com:<webserverport>/PowerSpaceServlet.
As
a Socket server, it can be started by:
java –classpath PowerKernel.jar com.neocoretechs.powerspaces.server.Main <port>
Talking to the server:
Applet Gateway
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF">
<applet
code="com.neocoretechs.powerspaces.PKAppletGateway.class"
width=0 height=0 name="PKAppletGateway"
archive="pkgateway.jar" MAYSCRIPT align="absbottom">
<param
name="Server"
value="http://127.0.0.1:8080/nct/servlet/">
<hr>
If your browser was Java-enabled, you would
see dynamically updating images
instead of this
paragraph.
<hr>
</applet>
</body>
</html>
IF
the above file is gateway.htm, This can be loaded from
main window:
<frame
name=”pkAppletGateway” src=”gateway.htm”>
Applet
gateway, Dynamic content
<script
language="JavaScript1.2">
<!--
function submitRec(layer,
indx, form1) {
parent.gatewayFrame.PKAppletGateway.setParamLength(form1.elements.length+2);
parent.gatewayFrame.PKAppletGateway.setParam(0, layer);
parent.gatewayFrame.PKAppletGateway.setParam(1, indx);
for(var i = 0; i < form1.elements.length; i++) {
parent.gatewayFrame.PKAppletGateway.setParam(i+2, form1.elements[i].value);
}
parent.gatewayFrame.PKAppletGateway.doInvokeWithArray('com.neocoretechs.imagepump.VectorMapHandler','updateCurrent');
doQuery(layer);
}
function deleteRec(layer,
indx) {
parent.gatewayFrame.PKAppletGateway.setParamLength(2);
parent.gatewayFrame.PKAppletGateway.setParam(0, layer);
parent.gatewayFrame.PKAppletGateway.setParam(1, indx);
parent.gatewayFrame.PKAppletGateway.doInvoke('com.neocoretechs.imagepump.VectorMapHandler','deleteCurrent');
doQuery(layer);
}
//-->
</script>
FORMS
SUBMITTER
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF">
<script
language="JavaScript1.2">
<!--
function doSubmit() {
var
formnum = arguments.length
- 2;
var
formname = "Params"
+ formnum;
for(i = 0; i
< document.forms.length; i++) {
if( document.forms[i].name == formname
) {
document.forms[i].action
= '../../servlet/com.neocoretechs.powerspaces.server.ContentServlet';
for(j
= 0; j < document.forms[i].elements.length;
j++) {
document.forms[i].elements[j].value = arguments[j];
}
document.forms[i].submit();
return;
}
}
}
//-->
</script>
<FORM
NAME="Params0" ACTION =
"../../servlet/"
˙˙˙˙˙˙ METHOD = "POST">
<INPUT TYPE =
"hidden" NAME = "class" VALUE = "">
<INPUT TYPE =
"hidden" NAME = "method" VALUE = "">
</FORM>
<FORM NAME="Params1"
ACTION =
"../../servlet/"
˙˙˙˙˙˙ METHOD = "POST">
<INPUT TYPE =
"hidden" NAME = "class" VALUE = "">
<INPUT TYPE =
"hidden" NAME = "method" VALUE = "">
<INPUT TYPE =
"hidden" NAME = "param0" VALUE = "">
</FORM>
</body>
</html>